@primary: #9C27B0;
@success: #673AB7;
@danger: #E91E63;
@secondary: #aaa;
@margin: 5px;
@size: 96px;
@border: 2px;

div {
    &::before,
    &::after {
        clear: both;
        display: table;
        content: "";
    }
}

.main {
    width: 100%;
    height: 100%;
    padding: 5px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: stretch;
    align-content: flex-start;
    &.random {
        overflow-y: visible;
        height: auto;
    }
}


.threshold {
    width: 120%;
    height: 0px;
    position: absolute;
    &::after {
        position: absolute;
        width: 100px;
        height: 0px;
        left: 100%;
        top: -6px;
        // width: 100%;
        text-align: center;
        font-size: 10px;
    }

    &:first-child {
        top: 0;
        border-bottom: 1px dashed rgba(0, 0, 0, 0.4);
    }

    &:last-child {
        bottom: 0;
        border-top: 1px dashed rgba(0, 0, 0, 0.4);
    }
}

.box {
    width: @size - @margin;
    height: @size - @margin;
    color: @secondary;
    // border: @border dotted rgba(0,0,0,0.4);
    // border-radius: @border;
    margin: 0 @margin @margin 0;
    position: relative;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 100ms;
    .img-thumbnail {
        padding: 0.25rem;
        background-color: #fff;
        max-width: 100%;
        height: auto;
    }

    &.wide {
        // width: @size * 2 - @margin;
        // flex-grow: 2;
    }

    &.ui-selectable,
    &.selectable {
        color: #fff;
        background-color: #aaa;
    }

    &::after {
        font-size: 12px;
        font-family: "Roboto Mono";
    }

    &.ui-selecting {
        background-color: @primary;
    }

    &.ui-selected {
        background-color: @success;
        .img-thumbnail {
            background-color: #ccc;
        }
    }

    &.ui-deselecting {
        background-color: @danger;
    }

    &.floated {
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    }
}

.ui-multiple {
    cursor: crosshair;
}

.key {
    display: flex;
    align-items: center;
    justify-content: center;

    .box {
        padding: 0;
        font-size: 13px;
        flex-grow: 1;
    }
}

a,
a:hover,
a:focus,
a:active {
    color: #333;
    outline: medium none;
    text-decoration: none;
}

.fa {
    font-size: 21px;
    padding-right: 5px;
    vertical-align: middle;
}

.dg,
.dg .c input[type="text"] {
    font: 11px "Roboto Mono", sans-serif;
}

.dg .property-name {
    overflow: visible;
}